x86/mm: Update mem sharing interface to (re)allow sharing of grants
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>
Thu, 26 Jan 2012 12:46:26 +0000 (12:46 +0000)
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>
Thu, 26 Jan 2012 12:46:26 +0000 (12:46 +0000)
commit3881f1a903ada4573be2eec5458a1defe5a34313
treee8801efb5b90a2c87c29f4e6c0788823d32a5e2f
parent76dd1b023d82f0461a6678c4c689a179d9a0c256
x86/mm: Update mem sharing interface to (re)allow sharing of grants

Previously, the mem sharing code would return an opaque handle to index shared
pages (and nominees) in its global hash table.  By removing the hash table, the
new interfaces requires a gfn and a version. However, when sharing grants, the
caller provides a grant ref and a version. Update interface to handle this
case.

The use case for grant sharing is when sharing from within a backend (e.g.
memshr + blktap2), in which case the backend is only exposed to grant
references.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Signed-off-by: Adin Scannell <adin@scannell.ca>
Committed-by: Tim Deegan <tim@xen.org>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/mem_sharing.c
xen/include/public/domctl.h